import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from "./router";
// import Header from "./components/Header.vue";
// import Footer from "./components/Footer.vue";
// import store from "./request/store";
import apiFun from "./request/api";
import piniaPersist from 'pinia-plugin-persist'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import { createPinia } from 'pinia'
const pinia = createPinia()
pinia.use(piniaPersist)

const app = createApp(App)
app.use(ElementPlus)
app.use(ElementPlus, {
    locale: zhCn,
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
/* 挂载全局组件 start */
// app.component("Header", Header);
// app.component("Footer", Footer);
/* 挂载全局组件 end */
/* 挂载全局对象 start */
app.config.globalProperties.$apiFun = apiFun
/* 挂载全局对象 end */
app.use(pinia)
app.use(router)
app.mount('#app')
